package com.ruoyi.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.inspection.domain.FzInspectionPlanRoute;
import com.ruoyi.inspection.mapper.FzInspectionPlanRouteMapper;
import com.ruoyi.inspection.service.IFzInspectionPlanRouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

/**
 * 计划路线Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-03-13
 */
@Service
public class FzInspectionPlanRouteServiceImpl implements IFzInspectionPlanRouteService
{
    @Autowired
    private FzInspectionPlanRouteMapper fzInspectionPlanRouteMapper;

    /**
     * 查询计划路线
     * 
     * @param id 计划路线ID
     * @return 计划路线
     */
    @Override
    public FzInspectionPlanRoute selectFzInspectionPlanRouteById(Integer id)
    {
        return fzInspectionPlanRouteMapper.selectFzInspectionPlanRouteById(id);
    }

    /**
     * 查询计划路线列表
     * 
     * @param fzInspectionPlanRoute 计划路线
     * @return 计划路线
     */
    @Override
    public List<FzInspectionPlanRoute> selectFzInspectionPlanRouteList(FzInspectionPlanRoute fzInspectionPlanRoute)
    {
        return fzInspectionPlanRouteMapper.selectFzInspectionPlanRouteList(fzInspectionPlanRoute);
    }

    /**
     * 新增计划路线
     * 
     * @param fzInspectionPlanRoute 计划路线
     * @return 结果
     */
    @Override
    public int insertFzInspectionPlanRoute(FzInspectionPlanRoute fzInspectionPlanRoute)
    {
        fzInspectionPlanRoute.setCreateTime(DateUtils.getNowDate());
        return fzInspectionPlanRouteMapper.insertFzInspectionPlanRoute(fzInspectionPlanRoute);
    }

    /**
     * 修改计划路线
     * 
     * @param fzInspectionPlanRoute 计划路线
     * @return 结果
     */
    @Override
    public int updateFzInspectionPlanRoute(FzInspectionPlanRoute fzInspectionPlanRoute)
    {
        fzInspectionPlanRoute.setUpdateTime(DateUtils.getNowDate());
        return fzInspectionPlanRouteMapper.updateFzInspectionPlanRoute(fzInspectionPlanRoute);
    }

    /**
     * 删除计划路线对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionPlanRouteByIds(String ids)
    {
        return fzInspectionPlanRouteMapper.deleteFzInspectionPlanRouteByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除计划路线信息
     * 
     * @param id 计划路线ID
     * @return 结果
     */
    @Override
    public int deleteFzInspectionPlanRouteById(Integer id)
    {
        return fzInspectionPlanRouteMapper.deleteFzInspectionPlanRouteById(id);
    }
}
